/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package cn.tedu.common.pojo.admin.model;

import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.time.LocalDateTime;
import lombok.Data;

/**
 * <p>
 * 管理员表
 * </p>
 *
 * @since 2021-12-02
 */
@Data
public class Admin implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(
        value = "管理员id")
    private Long id;

    /**
     * 用户名
     */
    @ApiModelProperty(
        value = "管理员用户名")
    private String username;

    /**
     * 密码（密文）
     */
    @ApiModelProperty(
        value = "管理员密码")
    private String password;

    /**
     * 昵称
     */
    @ApiModelProperty(
        value = "管理员昵称")
    private String nickname;

    /**
     * 头像URL
     */
    @ApiModelProperty(
        value = "管理员头像url")
    private String avatar;

    /**
     * 手机号码
     */
    @ApiModelProperty(
        value = "管理员手机号")
    private String phone;

    /**
     * 电子邮箱
     */
    @ApiModelProperty(
        value = "管理员电子邮箱")
    private String email;

    /**
     * 描述
     */
    @ApiModelProperty(
        value = "管理员描述")
    private String description;

    /**
     * 是否启用，1=启用，0=未启用
     */
    @ApiModelProperty(
        value = "是否启用，1=启用，0=未启用")
    private Integer enable;

    /**
     * 最后登录IP地址（冗余）
     */
    @ApiModelProperty(
        value = "最后登录IP地址")
    private String lastLoginIp;

    /**
     * 累计登录次数（冗余）
     */
    @ApiModelProperty(
        value = "累计登录次数")
    private Integer loginCount;

    /**
     * 最后登录时间（冗余）
     */
    @ApiModelProperty(
        value = "最后登录时间")
    private LocalDateTime gmtLastLogin;

    /**
     * 数据创建时间
     */
    @ApiModelProperty(
        value = "数据创建时间")
    private LocalDateTime gmtCreate;

    /**
     * 数据最后修改时间
     */
    @ApiModelProperty(
        value = "数据最后修改时间")
    private LocalDateTime gmtModified;

    /**
     * 控制台测试打印
     *
     * @return
     */
    @Override
    public String toString() {
        return "Admin{" +
            "id=" + id +
            ", username='" + username + '\'' +
            ", password='" + password + '\'' +
            ", nickname='" + nickname + '\'' +
            ", avatar='" + avatar + '\'' +
            ", phone='" + phone + '\'' +
            ", email='" + email + '\'' +
            ", description='" + description + '\'' +
            ", enable=" + enable +
            ", lastLoginIp='" + lastLoginIp + '\'' +
            ", loginCount=" + loginCount +
            ", gmtLastLogin=" + gmtLastLogin +
            ", gmtCreate=" + gmtCreate +
            ", gmtModified=" + gmtModified +
            '}';
    }
}
